package com.os.pojo.physicalmemory;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.Arrays;

/**
 * 页帧,内存块
 * 将物理内存划分成与页面大小相等的存储块
 */
public class Frame {
    /**
     * 页帧号
     */
    public int id;

    /**
     * 页号
     */
    public int pageId;
    /**
     * 表示内存内容的字符数组
     */
    public char[] chars;

    /**
     * 进程ID
     */
    public int pcbId;

    /**
     * 段号
     */
    public int segmentId;

    public Frame(int id) {
        this.id = id;
        this.pcbId = -1;
        this.segmentId = -1;
        this.pageId = -1;
        this.chars = null;
    }
}
